package com.dubbo.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.dubbo.inter.ServiceDemo;

/**
 * 控制器(测试用)
 * @author wyw
 * @date 2018年7月9日
 */
 @Controller
 public class ControllerDemo {
     
     @Resource 
     ServiceDemo service ;
     
     @RequestMapping("test")
     public String test(String username,HttpServletRequest request){
         System.out.println("MVC WELCOME");
         System.out.println(service.getUser(username));
         request.setAttribute("hello",service.getUser(username));
         return "test";
     }

}
